package edu.usc.cmb.iregulome.entity;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/*DROP TABLE IF EXISTS `STUDY_TABLE`;
 CREATE TABLE `STUDY_TABLE` (
 -- `STUDY_ID` int(4) unsigned NOT NULL AUTO_INCREMENT, -- AUTO INCREMENT
 `STUDY_ID` varchar(10) NOT NULL default '', -- \STUDY\@accession
 `F_SAMPLE_ID` varchar(10) NOT NULL default '',
 `STUDY_TITLE` varchar(200) NOT NULL default '', -- \STUDY\DESCRIPTOR\STUDY_TITLE
 `STUDY_TYPE` varchar(200) NOT NULL default'',  -- \STUDY\DESCRIPTOR\STUDY_TYPE
 `DESCRIPTION` varchar(5000) NOT NULL default '', -- \STUDY\DESCRIPTOR\STUDY_DESCRIPTION
 PRIMARY KEY (`STUDY_ID`)
 ) ENGINE=INNODB CHARSET=latin1;*/

@Entity
@Table(name = "STUDY_TABLE")
public class Study {

	@Id
	@Column(name = "STUDY_ID")
	private String id;

	@Column(name = "STUDY_TITLE")
	private String title;

	@Column(name = "TYPE")
	private String type;

	@Column(name = "STUDY_TYPE")
	private String studyType;

	@Column(name = "LIBRARY_STRATEGY")
	private String libraryStrategy;

	@Column(name = "DESCRIPTION")
	private String discription = "";

	@OneToMany(mappedBy = "study")
	private Set<Sample> samples;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getDiscription() {
		return discription;
	}

	public void setDiscription(String discription) {
		this.discription = discription;
	}

	public void setSamples(Set<Sample> samples) {
		this.samples = samples;
	}

	public Set<Sample> getSamples() {
		return samples;
	}

	public void setStudyType(String studyType) {
		this.studyType = studyType;
	}

	public String getStudyType() {
		return studyType;
	}

	public void setLibraryStrategy(String libraryStrategy) {
		this.libraryStrategy = libraryStrategy;
	}

	public String getLibraryStrategy() {
		return libraryStrategy;
	}

}
